<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for ./src/ocLazyLoad.directive.js</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../prettify.css">
    <link rel="stylesheet" href="../base.css">
    <style type='text/css'>
        div.coverage-summary .sorter {
            background-image: url(../sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class="header low">
    <h1>Code coverage report for <span class="entity">./src/ocLazyLoad.directive.js</span></h1>
    <h2>
        Statements: <span class="metric">12.5% <small>(2 / 16)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        Branches: <span class="metric">0% <small>(0 / 6)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        Functions: <span class="metric">12.5% <small>(1 / 8)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        Lines: <span class="metric">12.5% <small>(2 / 16)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
        Ignored: <span class="metric"><span class="ignore-none">none</span></span> &nbsp;&nbsp;&nbsp;&nbsp;
    </h2>
    <div class="path"><a href="../index.html">All files</a> &#187; <a href="index.html">./src/</a> &#187; ocLazyLoad.directive.js</div>
</div>
<div class="body">
<pre><table class="coverage">
<tr><td class="line-count">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39</td><td class="line-coverage"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
&nbsp;
(function (angular) {
    'use strict';
&nbsp;
    angular.module('oc.lazyLoad').directive('ocLazyLoad', <span class="fstat-no" title="function not covered" >function ($ocLazyLoad, $compile, $animate, $parse) {</span>
<span class="cstat-no" title="statement not covered" >        return {</span>
            restrict: 'A',
            terminal: true,
            priority: 1000,
            compile: <span class="fstat-no" title="function not covered" >function compile(element, attrs) {</span>
                // we store the content and remove it before compilation
<span class="cstat-no" title="statement not covered" >                var content = element[0].innerHTML;</span>
<span class="cstat-no" title="statement not covered" >                element.html('');</span>
&nbsp;
<span class="cstat-no" title="statement not covered" >                return <span class="fstat-no" title="function not covered" >function ($scope, $element, $attr) {</span></span>
<span class="cstat-no" title="statement not covered" >                    var model = $parse($attr.ocLazyLoad);</span>
<span class="cstat-no" title="statement not covered" >                    $scope.$watch(<span class="fstat-no" title="function not covered" >function () {</span></span>
<span class="cstat-no" title="statement not covered" >                        return model($scope) || $attr.ocLazyLoad; </span>// it can be a module name (string), an object, an array, or a scope reference to any of this
                    }, <span class="fstat-no" title="function not covered" >function (moduleName) {</span>
<span class="cstat-no" title="statement not covered" >                        if (angular.isDefined(moduleName)) {</span>
<span class="cstat-no" title="statement not covered" >                            $ocLazyLoad.load(moduleName).then(<span class="fstat-no" title="function not covered" >function () {</span></span>
<span class="cstat-no" title="statement not covered" >                                $animate.enter(content, $element);</span>
<span class="cstat-no" title="statement not covered" >                                var contents = element.contents();</span>
<span class="cstat-no" title="statement not covered" >                                angular.forEach(contents, <span class="fstat-no" title="function not covered" >function (content) {</span></span>
<span class="cstat-no" title="statement not covered" >                                    if (content.nodeType !== 3) {</span>
                                        // 3 is a text node
<span class="cstat-no" title="statement not covered" >                                        $compile(content)($scope);</span>
                                    }
                                });
                            });
                        }
                    }, true);
                };
            }
        };
    });
})(angular);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkM6L3dhbXAvd3d3L29jTGF6eUxvYWQvc3JjL29jTGF6eUxvYWQuZGlyZWN0aXZlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsQ0FBQyxVQUFBLE9BQU8sRUFBSTtBQUNSLGdCQUFZLENBQUM7O0FBRWIsV0FBTyxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUMsQ0FBQyxTQUFTLENBQUMsWUFBWSxFQUFFLFVBQVMsV0FBVyxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFO0FBQ3BHLGVBQU87QUFDSCxvQkFBUSxFQUFFLEdBQUc7QUFDYixvQkFBUSxFQUFFLElBQUk7QUFDZCxvQkFBUSxFQUFFLElBQUk7QUFDZCxtQkFBTyxFQUFFLGlCQUFTLE9BQU8sRUFBRSxLQUFLLEVBQUU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BQUM7Q0FFTixDQUFBLENBQUUsT0FBTyxDQUFDLENBQUMiLCJmaWxlIjoiQzovd2FtcC93d3cvb2NMYXp5TG9hZC9zcmMvb2NMYXp5TG9hZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyIoYW5ndWxhciA9PiB7XHJcbiAgICAndXNlIHN0cmljdCc7XHJcblxyXG4gICAgYW5ndWxhci5tb2R1bGUoJ29jLmxhenlMb2FkJykuZGlyZWN0aXZlKCdvY0xhenlMb2FkJywgZnVuY3Rpb24oJG9jTGF6eUxvYWQsICRjb21waWxlLCAkYW5pbWF0ZSwgJHBhcnNlKSB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgcmVzdHJpY3Q6ICdBJyxcclxuICAgICAgICAgICAgdGVybWluYWw6IHRydWUsXHJcbiAgICAgICAgICAgIHByaW9yaXR5OiAxMDAwLFxyXG4gICAgICAgICAgICBjb21waWxlOiBmdW5jdGlvbihlbGVtZW50LCBhdHRycykge1xyXG4gICAgICAgICAgICAgICAgLy8gd2Ugc3RvcmUgdGhlIGNvbnRlbnQgYW5kIHJlbW92ZSBpdCBiZWZvcmUgY29tcGlsYXRpb25cclxuICAgICAgICAgICAgICAgIHZhciBjb250ZW50ID0gZWxlbWVudFswXS5pbm5lckhUTUw7XHJcbiAgICAgICAgICAgICAgICBlbGVtZW50Lmh0bWwoJycpO1xyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbigkc2NvcGUsICRlbGVtZW50LCAkYXR0cikge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBtb2RlbCA9ICRwYXJzZSgkYXR0ci5vY0xhenlMb2FkKTtcclxuICAgICAgICAgICAgICAgICAgICAkc2NvcGUuJHdhdGNoKCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1vZGVsKCRzY29wZSkgfHwgJGF0dHIub2NMYXp5TG9hZDsgLy8gaXQgY2FuIGJlIGEgbW9kdWxlIG5hbWUgKHN0cmluZyksIGFuIG9iamVjdCwgYW4gYXJyYXksIG9yIGEgc2NvcGUgcmVmZXJlbmNlIHRvIGFueSBvZiB0aGlzXHJcbiAgICAgICAgICAgICAgICAgICAgfSwgbW9kdWxlTmFtZSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGFuZ3VsYXIuaXNEZWZpbmVkKG1vZHVsZU5hbWUpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkb2NMYXp5TG9hZC5sb2FkKG1vZHVsZU5hbWUpLnRoZW4oKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhbmltYXRlLmVudGVyKGNvbnRlbnQsICRlbGVtZW50KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudHMgPSBlbGVtZW50LmNvbnRlbnRzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5ndWxhci5mb3JFYWNoKGNvbnRlbnRzLCBjb250ZW50ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29udGVudC5ub2RlVHlwZSAhPT0gMykgeyAvLyAzIGlzIGEgdGV4dCBub2RlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkY29tcGlsZShjb250ZW50KSgkc2NvcGUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH07XHJcbiAgICB9KTtcclxuXHJcbn0pKGFuZ3VsYXIpO1xyXG4iXX0=</pre></td></tr>
</table></pre>

</div>
<div class="footer">
    <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sun Aug 23 2015 15:04:29 GMT+0200 (Paris, Madrid (heure d’été))</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="../sorter.js"></script>
</body>
</html>
